﻿<baseClass:Control xmlns:baseClass="clr-namespace:EFS.RC.ConversationBrowser.Controls" x:Class="EFS.RC.ConversationBrowser.Controls.Actions.ViewExternal"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Name="View"
    mc:Ignorable="d"
	MinWidth="500"
	MinHeight="350"
	xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:myUICtrl="clr-namespace:EFS.Common.UI.Controls;assembly=EFS.Common.UI" xmlns:myActions="clr-namespace:EFS.RC.ConversationBrowser.Controls.Actions" Loaded="Control_Loaded" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">

	<Control.Resources>
		<!-- Styling the DockPanelSplitter -->
		<Style x:Key="HorizontalBevelGrip" TargetType="sdk:GridSplitter">
			<Setter Property="BorderThickness" Value="6" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="sdk:GridSplitter">
						<Grid ToolTipService.ToolTip ="Resize" Background="LightGray">
							<!-- Grip -->
							<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
								<Rectangle Width="2" Height="2" Fill="#5A000000"/>
								<Rectangle Width="2" Height="2" Margin="2 0 2 0" Fill="#5A000000"/>
								<Rectangle Width="2" Height="2" Fill="#5A000000"/>
								<!-- (could also use an image or a drawing) -->
							</StackPanel>
							<!-- Bevels -->
							<Border BorderBrush="#5AFFFFFF" BorderThickness="0,1,0,0"/>
							<Border BorderBrush="#5A000000" BorderThickness="0,0,0,1"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="VerticalBevelGrip" TargetType="sdk:GridSplitter">
			<Setter Property="BorderThickness" Value="6" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="sdk:GridSplitter">
						<Grid ToolTipService.ToolTip="Resize" Background="LightGray">
							<!-- Grip -->
							<StackPanel Orientation="Vertical" VerticalAlignment="Center">
								<Rectangle Width="2" Height="2" Fill="#5A000000"/>
								<Rectangle Width="2" Height="2" Margin="0 2 0 2" Fill="#5A000000"/>
								<Rectangle Width="2" Height="2" Fill="#5A000000"/>
								<!-- (could also use an image or a drawing) -->
							</StackPanel>
							<!-- Bevels -->
							<Border BorderBrush="#5AFFFFFF" BorderThickness="1,0,0,0"/>
							<Border BorderBrush="#5A000000" BorderThickness="0,0,1,0"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Control.Resources>

	<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
		<myUICtrl:Header HorizontalAlignment="Stretch" Name="controlHeader" VerticalAlignment="Top" Height="95" Text="Conversation View" />
		<Border Background="#FF585858" Margin="0,95,0,0" Height="1" VerticalAlignment="Top" />
		<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,100,0,0" x:Name="gridControls">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"></ColumnDefinition>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<!-- Menu -->
				<RowDefinition Height="Auto"></RowDefinition>
				<!-- Events & Survey -->
				<RowDefinition Height="*"></RowDefinition>
				<!-- Player -->
				<RowDefinition Height="66"></RowDefinition>
			</Grid.RowDefinitions>

			<StackPanel Grid.Row="0" Grid.Column="0" Height="Auto" HorizontalAlignment="Left" Margin="0,0,0,0" Name="stackPanelMenu" VerticalAlignment="Top" Width="Auto" Orientation="Horizontal">
				<Grid Name="gridMenuItemSurvey" Height="22" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="Auto">
					<!-- this will be removed from code and add the actual menuitem -->
					<TextBlock Text="Monitoring"></TextBlock>
				</Grid>
				<TextBlock Name="labelScoring" Text="Scoring" Margin="480,6,1090,0" Foreground="#313ab7" FontSize="14" Width="124" />

			</StackPanel>

			<Grid Grid.Column="0" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,10,0,10">
				<Grid.ColumnDefinitions>
					<!-- Events -->
					<ColumnDefinition Width="*"></ColumnDefinition>
					<!-- Splitter -->
					<ColumnDefinition Width="Auto"></ColumnDefinition>
					<!-- Survey -->
					<ColumnDefinition Width="Auto"></ColumnDefinition>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"></RowDefinition>
				</Grid.RowDefinitions>
				<sdk:GridSplitter 
					Grid.Row="0"
					Grid.RowSpan="1"
					Grid.Column="1"
					Height="Auto"
					Width="6"
					HorizontalAlignment="Stretch"
					VerticalAlignment="Stretch"
					Margin="0"
					ShowsPreview="True"
					Style="{StaticResource VerticalBevelGrip}" />
				<Border BorderThickness="1">
					<sdk:DataGrid Grid.Row="0" Grid.Column="0" AutoGenerateColumns="False" MinHeight="100" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="dataGridResults" VerticalAlignment="Stretch" Width="Auto" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
						<interactivity:Interaction.Behaviors>
							<myUICtrl:DataGridDoubleClickBehavior DoubleClick="dataGridResults_DoubleClick"/>
						</interactivity:Interaction.Behaviors>
						<sdk:DataGrid.Columns>
							<sdk:DataGridTemplateColumn Header="">
								<sdk:DataGridTemplateColumn.CellTemplate>
									<DataTemplate>
										<HyperlinkButton Content="Jump To" Name="hyperlinkButtonJumpTo" Click="hyperlinkButtonJumpTo_Click" VerticalAlignment="Center" HorizontalAlignment="Center"></HyperlinkButton>
									</DataTemplate>
								</sdk:DataGridTemplateColumn.CellTemplate>
							</sdk:DataGridTemplateColumn>
							<sdk:DataGridTextColumn Binding="{Binding Path=EventType, TargetNullValue='N/A'}" Header="Event Type" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=Occurred, TargetNullValue='N/A',StringFormat='dd/MM/yyyy HH:mm:ss'}" Header="Occurred" IsReadOnly="True" Width="Auto" CanUserSort="True" />
							<sdk:DataGridTextColumn Binding="{Binding Path=OccurredFromBeginningDT, TargetNullValue='N/A', StringFormat='HH:mm:ss'}" Header="Position" IsReadOnly="True" Width="Auto" CanUserSort="True" />
							<sdk:DataGridTextColumn Binding="{Binding Path=DurationDT, TargetNullValue='N/A', StringFormat='HH:mm:ss'}" Header="Duration" IsReadOnly="True" Width="Auto" CanUserSort="True" />
							<sdk:DataGridTextColumn Binding="{Binding Path=CustomerUri, TargetNullValue='N/A'}" Header="Customer Tel" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=CustomerFirstName, TargetNullValue='N/A'}" Header="Customer First Name" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=CustomerLastName, TargetNullValue='N/A'}" Header="Customer Last Name" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=AgentFirstName, TargetNullValue='N/A'}" Header="Agent Firstname" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=AgentLastName, TargetNullValue='N/A'}" Header="Agent Lastname" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=SupervisorFirstName, TargetNullValue='N/A'}" Header="Supervisor Firstname" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=SupervisorLastName, TargetNullValue='N/A'}" Header="Supervisor Lastname" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=HWPartyID, TargetNullValue='N/A'}" Header="HW Party ID" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=HWApplicantID, TargetNullValue='N/A'}" Header="HW Applicant ID" IsReadOnly="True" Width="Auto" />
							<sdk:DataGridTextColumn Binding="{Binding Path=ConversationClassName, TargetNullValue='N/A'}" Header="Classification" IsReadOnly="True" Width="Auto" />
						</sdk:DataGrid.Columns>
					</sdk:DataGrid>
				</Border>
				<ScrollViewer Grid.Row="0" Grid.Column="2" Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="scrollViewerSurvey" VerticalAlignment="Stretch" Width="Auto" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderThickness="0">

					<toolkit:DockPanel  Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="dockPanelSurvey" VerticalAlignment="Stretch" Width="Auto">

					</toolkit:DockPanel>
				</ScrollViewer>

			</Grid>

			<!-- Will be added dinamically -->
			<myActions:Play Grid.Row="2" Grid.Column="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="controlPlay" VerticalAlignment="Top" Height="66" />


		</Grid>


	</Grid>

</baseClass:Control>